const designWith = 1845;
/** rem by 雒靖辰
 * @param {Object} doc document
 * @param {Object} win	window
 * @param {Object} dw	375  
 * 20px = 1rem;
 */
(function (doc, win, dw) {
  let docEl = doc.documentElement
  let designHeight = docEl.clientHeight
  const resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
  let recalc = function () {
	var clientWidth = docEl.clientWidth < 1845 ? 1845 : docEl.clientWidth
	if (!clientWidth) return
	docEl.style.fontSize = 20 * (clientWidth / dw) + 'px';
  }
  if (!doc.addEventListener) return;
  win.addEventListener(resizeEvt, recalc, false);
  doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window, designWith);

export const SIZE = 20 * (document.documentElement.clientWidth / designWith);
export const SCALE = (document.documentElement.clientWidth / designWith);